package com.verlet.web.handle;

import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.Map;


/**
 * 指定类的熔断处理方法
 *
 * @author verlet
 */
@Slf4j
public class FallbackHandle {

    public static Map<String, Object>  handleException(Throwable throwable){
        throwable.printStackTrace();
        log.info("发送熔断。");
        Map<String, Object> result = new HashMap<>();
        result.put("code", 200);
        result.put("msg", "发送熔断，服务降级。");
        return result;
    }
}
